package org.xi.behavioral.observer.impl;

import org.xi.behavioral.observer.api.Observer;

public class Subscriber implements Observer {
    private String name;

    public Subscriber(String name) {
        this.name = name;
    }

    @Override
    public void notify(String news) {
        System.out.println(name + " received the update: " + news);
    }
}